@extends('admin.base')
    @section('content')
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            信息输出表
            <small>preview of simple tables</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#">用户信息</a></li>
            <li class="active">列表</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">
            <div class="col-md-12">
              <div class="box">
                <div class="box-header with-border">
                  <h3 class="box-title"><i class="fa fa-th"></i> 用户收货地址详情</h3>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <table class="table table-bordered  text-center">
                    <tr>
                      <th>收货人姓名</th>
                      <th>地区</th>
                      <th>街道</th>
                      <th>邮编</th>
                      <th>电话</th>
                      <th>是否为默认地址</th> 
                      <th>操作</th>
                    </tr>
                    @foreach($list as $v)
                    <tr>
                      <td>{{$v->pName}}</td>
                      <td>{{$v->province}}{{$v->province}}{{$v->area}}{{$v->xiang}}</td>
                      <td>{{$v->street}}</td>
                      <td>{{$v->post}}</td>
                      <td>{{$v->phone}}</td>
                      <td>{{ $v->status == "0" ? "" : "默认地址" }}</td>
                      <td>
                      <button onclick="doShow({{$v->uid}})" class="btn btn-xs btn-success">所属用户详情</button> 
					  </td>
                    </tr>
                    @endforeach
                  
                  </table>
                </div><!-- /.box-body -->
                <div class="box-footer clearfix">
                 
                </div>
              </div><!-- /.box -->

              
              
            </div><!-- /.col -->
            
          </div><!-- /.row -->
         
        </section><!-- /.content -->
        <form action="" style="display:none;" id="mydeleteform" method="post">
            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
            <input type="hidden" name="_method" value="DELETE">
        </form>
        <form action="" style="display:none;" id="myeditform" method="get">
        </form>
        <form action="" style="display:none;" id="myshowform" method="get">
        </form>
    @endsection
    
    
    @section("myscript")
      <script type="text/javascript">
            function doDel(id){
                if(confirm('确定要删除吗？')){
                    $("#mydeleteform").attr("action","{{url('admin/user')}}/"+id).submit(); 
                }
            }
			
			function doEdit(id){
				$("#myeditform").attr("action","{{url('admin/address')}}/"+id+"/edit").submit(); 
			}
			
			function doShow(id){
				$("#myshowform").attr("action","{{url('admin/user')}}/"+id).submit(); 
			}
      </script>
    @endsection